package cn.com.dcsgo.dto;

import cn.com.dcsgo.validation.ValueOf;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 添加公告请求参数
 *
 * @author Dcsgo
 * @since 2025/10/27 9:08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "添加公告请求参数")
public class NoticeAddDTO {
    /**
     * 公告标题
     */
    @Schema(description = "公告标题")
    @NotBlank(message = "公告标题不能为空或空白字符串")
    private String title;

    /**
     * 公告内容
     */
    @Schema(description = "公告内容")
    @NotBlank(message = "公告内容不能为空或空白字符串")
    private String content;

    /**
     * 状态(1:公布 0:撤回)
     */
    @ValueOf(value = {"1", "0"}, message = "状态只能为1:公布 0:撤回")
    @Schema(description = "状态(1:公布 0:撤回)")
    private Integer status;

    /**
     * 是否置顶
     */
    @ValueOf(value = {"1", "0"}, message = "是否置顶只能为1置顶，0不置顶")
    @Schema(description = "是否置顶")
    private Integer isTop;
}
